spa.nav = (function($){
    var
        configMap = {
            title : '绥化十中',
            main_html : String() +
                '<nav class="navbar navbar-fixed-top navbar-inverse navbar-embossed" role="navigation">' +
                    '<div class="navbar-header">' +
                        '<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">' +
                            '<span class="sr-only">导航切换</span>' +
                        '</button>'+
                        '<a class="navbar-brand" href="#">绥化十中</a>' +
                    '</div>' +
                    '<div class="collapse navbar-collapse">' +
                    '</div>' +
                '</nav>',
            settable_map : {
                title : true
            }
        },

        stateMap = {
            $container : null
        },

        jqueryMap = {

        },initModule,setJqueryMap,configModule

    setJqueryMap = function(){
        var $container = stateMap.$container,$title,$nav,$nav_body
        $nav = $(configMap.main_html)
        $nav_body = $nav.find('.navbar-collapse')
        $container.append($nav)
        $title = $nav.find("a")

        jqueryMap = {
            $container : $container,
            $nav : $nav,
            $title : $title,
            $nav_body : $nav_body
        }
    }



    initModule = function($container){
        stateMap.$container = $container
        setJqueryMap()
        spa.nav.login.initModule(jqueryMap.$nav_body)
    }

    configModule = function(options){
        spa.util.setConfigMap({
            input_map : options,
            settable_map : configMap.settable_map,
            config_map : configMap
        })
        return true
    }

    return {
        initModule : initModule,
        configModule : configModule
    }
}(jQuery))
